home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / xc / .autocis < prev    next >
Text File  |  1994-03-10  |  4KB  |  110 lines

  1. # .autocis - xc script to visit CIS automagically.
  2. # This file uses 4-character tabstops.
  3. # It will log in, visit CIS Mail (if mail is waiting), then the
  4. #  PRACTICE and UNIX Fora, uploading any prepared files, downloading
  5. #  all new messages, and capture them into three separate files.
  6.  
  7. # The following assumption is made about your CIS interactions:
  8. #  You are in "expert" mode in MAIL.
  9. #  You are in Command mode in all Fora.
  10. #  You have opted for continuous reading in all Fora.
  11. #  You have set your Prompt Char set to '^H' --backspace-- in all Fora.
  12. #    This last is VERY critical to the properly trigger the WAITFORs
  13.  
  14. # This script will call another script, .temp_opt, to set Forum options
  15. # for only the current login
  16.  
  17. tty "on"        # echo to the tty while script is running (default anyways)
  18. debug "on"        # capture in debug.log providing file pre-exists
  19. set proto 7e    # CIS is happier
  20. set bps 2400
  21. set cis off        # don't trigger on any stray ENQ character
  22. set xoff on        # set XON/XOFF signalling
  23.  
  24. #  if linked; then  # this alternate routine calls a
  25. #    call .cisdial    # sub-script with the dialing information
  26. #  endif
  27.  
  28. if ! linked; then dial "7662080"; endif    # dial this number
  29. while ! waitfor "CONNECT" 52            # give modem 52 secs to say "CONNECT"
  30.     do
  31.         redial
  32.     done
  33.  
  34. pause 2                        # let network catch up
  35. transmit "^C"                # First thing to send CIS
  36. pause 3                        # let network catch up
  37.  
  38. debug "off"                    # so as not to display the password
  39. # Now send CIS one string with PPN, first service to go to, and password
  40. transmit "72160,1341/go:mail\\beige*screw^M"
  41. debug "on"
  42.  
  43. if waitfor "CompuServe Mail^M" 8            # we already asked to GO MAIL
  44. then if ! waitfor "No messages pending" 4    # unless nothing waiting, then
  45.      set cfile "email"                        # use this capture file
  46.         capture "on"                        # open it
  47.         file echo `date`                    # time stamp it
  48.         transmit "rec all^M"                # ask to read everything
  49.         while ! waitfor "Mail!"                #  until this string appears
  50.             do; done                        #  script does nothing
  51.         transmit "del all^M"                # remove msgs from CIS mbox
  52.         capture "off"                        # close the capture file
  53.     fi
  54. else
  55.     beep                            # beep if we never get to CISMail
  56. endif
  57.  
  58. set cfile "pra"                        # new capture file
  59. transmit "g practice^M"                # new Forum
  60. waitfor "moment please..."            # "Welcome" should follow this
  61. capture "on"                        # start appending to 'pra'
  62. if waitfor "forum !^H" 60            # prompt with a backspace
  63. then
  64.     call ".temp_opt"                # set Forum options for this session.
  65.     assign Upload eq `ls rp 2>/dev/null`
  66.     if Upload eq "praR"                # is there a 'praR' file
  67.     then    capture "off"            # then turn off capturing
  68.         type "praR"                    # transmit the 'praR' file
  69.         transmit "^M"                # this extra newline will trigger
  70.         while ! waitfor "% choice required"    # this response after the upload
  71.             do; done
  72.         shell "mv praR /usr/tmp/praR$$"    # rename the 'praR' file
  73.         capture "on"                # start capturing again
  74.     fi
  75.     transmit "rea new^M^M"            # read all new messages
  76.     while ! waitfor "% choice required"
  77.         do; done
  78.     capture "off"
  79. else
  80.     beep                            # beep if Forum closed, or you get bumped
  81. fi
  82.  
  83. set cfile "uni"                        # same stuff in another Forum
  84. transmit "g unixforum^M"
  85. waitfor "moment please..."
  86. capture "on"
  87. if waitfor "forum !^h" 60
  88. then
  89.     call ".temp_opt"            
  90.     assign Upload eq `ls ru 2>/dev/null`
  91.     if Upload eq "uniR"
  92.     then    capture "off"
  93.         type "uniR"
  94.         transmit "^M"
  95.         while ! waitfor "% choice required"
  96.             do; done
  97.         shell "mv uniR /usr/tmp/uniR$$"
  98.         capture "on"
  99.     fi
  100.     transmit "rea new^M^M"
  101.     while ! waitfor "% choice required"
  102.         do; done
  103.     capture "off"
  104. else
  105.     beep
  106. fi
  107.  
  108. transmit "off^M"
  109. quit
  110.